var _data_ = {
  url: Com.getRequestDomain() + "/gswz-web/info/list/1.0?channelid=",
  DataList: [],
};
$(function() {
  getDate();
})

function getDate() {
  var location = window.location.href;
  if (location.indexOf("zixun_mtsy") > -1) {
    _data_.url = _data_.url + "0001000300010001";
  } else if (location.indexOf("zixun_news") > -1) {
    _data_.url = _data_.url + "0001000300010002";
  } else if (location.indexOf("zixun_shzr") > -1) {
    _data_.url = _data_.url + "0001000300010003";
  } else if (location.indexOf("xxgs_cpgs") > -1) {
    _data_.url = _data_.url + "0001000300020001";
  } else if (location.indexOf("xxgs_gsgmgg") > -1) {
    _data_.url = _data_.url + "0001000300020002";
  }else if (location.indexOf("xxgs_zqjy") > -1) {
    _data_.url = _data_.url + "0001000300020003";
  }
  Com.ajax({
    url: _data_.url,
    type: 'post',
    success: function(response) {
      if (response.result[0].code == 0) {
        _data_.DataList = response.data;
        if (_data_.DataList.length > 0) {
          console.log(_data_.DataList);
          $('.templateList').html(template('Template', _data_));
        }
      } else {
        alert(response.result[0].code + ':' + response.result[0].msg);
      }
    }
  });
}
